//
//  HeadImgController.m
//  zhangchu
//
//  Created by aoyolo on 15/11/3.
//  Copyright © 2015年 李祖铜. All rights reserved.
//

#import "HeadImgController.h"

#import "Headmodel.h"

@interface HeadImgController ()
@property (weak, nonatomic) IBOutlet UIWebView *headImgweb;

@end

@implementation HeadImgController

- (void)viewDidLoad {
    [super viewDidLoad];
    //导航栏返回按钮
    self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
    self.navigationItem.leftBarButtonItem  = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"详情页返回"] style:UIBarButtonItemStylePlain target:self action:@selector(backTo)];
   
   //返回加载webView 和标题
    self.title = _model.title;
    [self.navigationController.navigationBar setTitleTextAttributes:
@{NSFontAttributeName:[UIFont systemFontOfSize:18],NSForegroundColorAttributeName:[UIColor whiteColor]}];

    NSURLRequest *requst =[NSURLRequest requestWithURL:[NSURL URLWithString:_model.link]];
    [self.headImgweb loadRequest:requst];
}


-(void)backTo
{
    [self.navigationController popViewControllerAnimated:YES];
}


@end
